<template>
  <div class="systemDetails">
    <homeHeader></homeHeader>
    <breadcrumb :isShowBanner='false'></breadcrumb>
    <div class="announcementNews">
      <div class="headerTopMain">
        <div class="announceList">
          <article class="announceArt">
            <aside>
              <p>{{systemDetailsData.title}}</p>
              <p>{{_Util.formatDateTime(systemDetailsData.createTime)}}</p>
            </aside>
            <section v-html="systemDetailsData.content"></section>
          </article>
        </div>
      </div>
    </div>
    <homeFooter></homeFooter>
  </div>
</template>

<script>
  import './main.scss';
  import homeHeader from '../../components/lotteryColor/header/index';
  import breadcrumb from '../../components/breadcrumb/index';
  import homeFooter from '../../components/footer/index';
  export default {
    data() {
      return {
        systemDetailsData: '',
      }
    },
    components: {
      homeHeader,
      homeFooter,
      breadcrumb
    },
    activated() {
      this.initData();
      this.initBreadcrumb();
    },
    methods: {
      initData() {
        let that = this;
        that._Util.post(that, that._Api.POST_ANNOUNCE_DETAIL, {id: that.$route.query.noticeId}, (data)=>{
          that.systemDetailsData = data;
        });
      },
      //初始化面包屑导航数据
      initBreadcrumb() {
        let breadcrumbData = [
          {name: '首页', routeName: 'index'},
          {name: '系统公告', routeName: "systemOf"},
          {name: '公告详情', routeName: "systemDetails",query:{noticeId:this.$route.query.noticeId}},
        ];
        this.$store.commit('BREADCRUMB_DATA', breadcrumbData);
      },
    }
  }
</script>
